]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/backgroundApps: Add section title
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 24 Feb 2023 00:41:26 +0000 (01:41 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 19 Mar 2023 12:06:06 +0000 (12:06 +0000)
At least for the time being, the background portal's app monitor
only supports flatpak apps, which are the only apps where we can
reliably match processes to .desktop files and assume that they
belong to graphical apps.

To indicate that there may well be apps that don't appear in the
list despite running in the background, add a clarifying section
title.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6400

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2681>

js/ui/status/backgroundApps.js

index 606fa334813aca71944608270d6609edc4786e1d..49878c13465503838a1860b7aefa65d6e0165463 100644 (file)
@@ -146,6 +146,14 @@ class BackgroundAppsToggle extends QuickToggle {
             null,
             Gio.DBusProxyFlags.DO_NOT_AUTO_START);
 
+        this._listTitle = new PopupMenu.PopupMenuItem(
+            _('Apps known to be running without a window'),
+            {reactive: false});
+        this._listTitle.label.clutter_text.set({
+            line_wrap: true,
+        });
+        this.menu.addMenuItem(this._listTitle);
+
         this._appsSection = new PopupMenu.PopupMenuSection();
         this.menu.addMenuItem(this._appsSection);
 
@@ -183,6 +191,7 @@ class BackgroundAppsToggle extends QuickToggle {
                 '%d Background App',
                 '%d Background Apps',
                 nBackgroundApps).format(nBackgroundApps);
+        this._listTitle.visible = nBackgroundApps > 0;
 
         this._appsSection.removeAll();